home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / SecalDemo / Inc / devices / inputevent.inc < prev    next >
Text File  |  1998-06-24  |  4KB  |  156 lines

  1. include "inc/devices/timer.inc";
  2. include "inc/utility/hooks.inc";
  3. include "inc/utility/tagitem.inc";
  4.  
  5. def IECLASS_NULL = $00;
  6. def IECLASS_RAWKEY = $01;
  7. def IECLASS_RAWMOUSE = $02;
  8. def IECLASS_EVENT = $03;
  9. def IECLASS_POINTERPOS = $04;
  10. def IECLASS_TIMER = $06;
  11. def IECLASS_GADGETDOWN = $07;
  12. def IECLASS_GADGETUP = $08;
  13. def IECLASS_REQUESTER = $09;
  14. def IECLASS_MENULIST = $0a;
  15. def IECLASS_CLOSEWINDOW = $0b;
  16. def IECLASS_SIZEWINDOW = $0c;
  17. def IECLASS_REFRESHWINDOW = $0d;
  18. def IECLASS_NEWPREFS = $0e;
  19. def IECLASS_DISKREMOVED = $0f;
  20. def IECLASS_DISKINSERTED = $10;
  21. def IECLASS_ACTIVEWINDOW = $11;
  22. def IECLASS_INACTIVEWINDOW = $12;
  23. def IECLASS_NEWPOINTERPOS = $13;
  24. def IECLASS_MENUHELP = $14;
  25. def IECLASS_CHANGEWINDOW = $15;
  26.  
  27. def IECLASS_MAX = $15;
  28.  
  29. def IESUBCLASS_COMPATIBLE = $00;
  30. def IESUBCLASS_PIXEL = $01;
  31. def IESUBCLASS_TABLET = $02;
  32. def IESUBCLASS_NEWTABLET = $03;
  33.  
  34. struct IEPointerPixel is
  35.   iepp_Screen:ulong;
  36.   iepp_Position:struct is
  37.     X:word;
  38.     Y:word;
  39.   ;
  40. ;
  41.  
  42. struct IEPointerTablet is
  43.   iept_Range:struct is
  44.     X:uword;
  45.     Y:uword;
  46.   ;
  47.   iept_Value:struct is
  48.     X:uword;
  49.     Y:uword;
  50.   ;
  51.  
  52.   iept_Pressure:word;
  53. ;
  54.  
  55. struct IENewTablet is
  56.   ient_CallBack:ulong;
  57.   ient_ScaledX,ient_ScaledY:uword;
  58.   ient_ScaledXFraction,ient_ScaledYFraction:uword;
  59.   ient_TabletX,ient_TabletY:ulong;
  60.   ient_RangeX,ient_RangeY:ulong;
  61.   ient_TagList:ulong;
  62. ;
  63.  
  64. def IECODE_UP_PREFIX = $80;
  65. def IECODE_KEY_CODE_FIRST = $00;
  66. def IECODE_KEY_CODE_LAST = $77;
  67. def IECODE_COMM_CODE_FIRST = $78;
  68. def IECODE_COMM_CODE_LAST = $7f;
  69.  
  70. def IECODE_C0_FIRST = $00;
  71. def IECODE_C0_LAST = $1f;
  72. def IECODE_ASCII_FIRST = $20;
  73. def IECODE_ASCII_LAST = $7e;
  74. def IECODE_ASCII_DEL = $7f;
  75. def IECODE_C1_FIRST = $80;
  76. def IECODE_C1_LAST = $9f;
  77. def IECODE_LATIN1_FIRST = $a0;
  78. def IECODE_LATIN1_LAST = $ff;
  79.  
  80. def IECODE_LBUTTON = $68;
  81. def IECODE_RBUTTON = $69;
  82. def IECODE_MBUTTON = $6a;
  83. def IECODE_NOBUTTON = $ff;
  84.  
  85. def IECODE_NEWACTIVE = $01;
  86. def IECODE_NEWSIZE = $02;
  87. def IECODE_REFRESH = $03;
  88.  
  89. def IECODE_REQSET = $01;
  90. def IECODE_REQCLEAR = $00;
  91.  
  92. def IEQUALIFIER_LSHIFT = $0001;
  93. def IEQUALIFIER_RSHIFT = $0002;
  94. def IEQUALIFIER_CAPSLOCK = $0004;
  95. def IEQUALIFIER_CONTROL = $0008;
  96. def IEQUALIFIER_LALT = $0010;
  97. def IEQUALIFIER_RALT = $0020;
  98. def IEQUALIFIER_LCOMMAND = $0040;
  99. def IEQUALIFIER_RCOMMAND = $0080;
  100. def IEQUALIFIER_NUMERICPAD = $0100;
  101. def IEQUALIFIER_REPEAT = $0200;
  102. def IEQUALIFIER_INTERRUPT = $0400;
  103. def IEQUALIFIER_MULTIBROADCAST = $0800;
  104. def IEQUALIFIER_MIDBUTTON = $1000;
  105. def IEQUALIFIER_RBUTTON = $2000;
  106. def IEQUALIFIER_LEFTBUTTON = $4000;
  107. def IEQUALIFIER_RELATIVEMOUSE = $8000;
  108.  
  109. def IEQUALIFIERB_LSHIFT = 0;
  110. def IEQUALIFIERB_RSHIFT = 1;
  111. def IEQUALIFIERB_CAPSLOCK = 2;
  112. def IEQUALIFIERB_CONTROL = 3;
  113. def IEQUALIFIERB_LALT = 4;
  114. def IEQUALIFIERB_RALT = 5;
  115. def IEQUALIFIERB_LCOMMAND = 6;
  116. def IEQUALIFIERB_RCOMMAND = 7;
  117. def IEQUALIFIERB_NUMERICPAD = 8;
  118. def IEQUALIFIERB_REPEAT = 9;
  119. def IEQUALIFIERB_INTERRUPT = 10;
  120. def IEQUALIFIERB_MULTIBROADCAST = 11;
  121. def IEQUALIFIERB_MIDBUTTON = 12;
  122. def IEQUALIFIERB_RBUTTON = 13;
  123. def IEQUALIFIERB_LEFTBUTTON = 14;
  124. def IEQUALIFIERB_RELATIVEMOUSE = 15;
  125.  
  126. struct InputEvent is
  127.   ie_NextEvent:ulong;
  128.   ie_Class:ubyte;
  129.   ie_SubClass:ubyte;
  130.   ie_Code:uword;
  131.   ie_Qualifier:uword;
  132.   ie_position:union is
  133.     ie_xy:struct is
  134.       ie_x:word;
  135.       ie_y:word;
  136.     ;
  137.     ie_addr:ulong;
  138.     ie_dead:struct is
  139.       ie_prev1DownCode:ubyte;
  140.       ie_prev1DownQual:ubyte;
  141.       ie_prev2DownCode:ubyte;
  142.       ie_prev2DownQual:ubyte;
  143.     ;
  144.   ;
  145.   ie_TimeStamp:timeval;
  146. ;
  147.  
  148. def ie_X = ie_position.ie_xy.ie_x;
  149. def ie_Y = ie_position.ie_xy.ie_y;
  150. def ie_EventAddress = ie_position.ie_addr;
  151. def ie_Prev1DownCode = ie_position.ie_dead.ie_prev1DownCode;
  152. def ie_Prev1DownQual = ie_position.ie_dead.ie_prev1DownQual;
  153. def ie_Prev2DownCode = ie_position.ie_dead.ie_prev2DownCode;
  154. def ie_Prev2DownQual = ie_position.ie_dead.ie_prev2DownQual;
  155.  
  156.